package com.ywy.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ywy.entity.Post;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ywy.vo.PostVo;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 博客文章 Mapper 接口
 * </p>
 *
 * @author ywy
 * @since 2021-12-24
 */
public interface PostMapper extends BaseMapper<Post> {
    /**
     * 分页查询博客文章信息
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<PostVo> listByPage(Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);

    /**
     * 根据id查询博客文章详细信息
     * @param id
     * @return
     */
    PostVo getDetail(Integer id);
}
